export class TextWidgetData {
  type: string
  initW: number
  initH: number
  x: number
  y: number
  width: number
  height: number
  active: boolean
  text: string
  fontSize: number
  color: string
  backgroundColor: string
  zIndex: number
  lineHeight: number
  textAlign: string
  fontWeight: string
  fontStyle: string
  textDecoration: string
  border: number
  fontFamily: string
  config: object

  constructor(config: object = {}) {
    this.type = 'text'
    this.initW = 75
    this.initH = 22
    this.x = 10
    this.y = 10
    this.width = 75
    this.height = 22
    this.text = '文本'
    this.active = true
    this.fontSize = 14
    this.color = '#000000'
    this.backgroundColor = '#ffffff'
    this.zIndex = 0
    this.lineHeight = 22
    this.textAlign = 'left'
    this.fontWeight = 'normal'
    this.fontStyle = 'normal'
    this.textDecoration = 'none'
    this.border = 0
    this.config = config
    this.fontFamily = 'SimSun'
  }
}
